<include file="Public:header"/>




<table bordercolor="#DDDFFF" border="1" width="100%" style="border-collapse: collapse" cellpadding="3">
	<tr height="17" align="center">
		<td class="title" width="100">卡号</td>
		<td class="title" width="100">面额</td>
		<td class="title" width="100">数量</td>
		<td class="title" width="100">开始时间</td>
		<td class="title" width="100">失效时间</td>
		<td class="title" width="150">添加时间</td>
		<td class="title" width="40">删除</td>
		<td class="title" width="40">下载</td>
		<td class="title">　</td>
	</tr>
<volist name="wallet" id="wallet">
	<tr height="20" bgcolor="#F1F5FA" class="cat_list" align="center">
		<td width="100" style="font-weight:bold"><a href="javascript:look('{$wallet.wallet_id}');">{$wallet.wallet_id}</a></td>
		<td width="100">￥{$wallet.amount}</td>
		<td width="100">{$wallet.num}</td>
		<td width="80">{$wallet.begin_time|date="Y-m-d",###}</td>
		<td align="center">{$wallet.end_time|date="Y-m-d",###}</td>
		<td width="150">{$wallet.add_time|date="Y-m-d H:i:s",###}</td>
		<td width="40"><a href="javascript:;" onclick="del('{$wallet.wallet_id}')"><img alt="删除" src="__APP__/statics/icons/icon_delete.gif"></a></td>
		<td width="40"><a href="__URL__/download/?id={$wallet.wallet_id}"><img alt="下载" src="__APP__/statics/icons/icon_desc.gif"></a></td>
		
		<td></td>
	</tr>
</volist>
</table>

<script src="__APP__/statics/webox/webox.js"></script>
<link href="__APP__/statics/webox/jquery-webox.css" rel="stylesheet" type="text/css">
<script type="text/javascript">
function look(t){
		$.webox({
			height:450,
			width:950,
			bgvisibel:true,
			title:t+'礼品卡列表',
			iframe:'__URL__/wallet_detail/id/'+t
		});
}

function del(t){
    var id=t;
	if(confirm('你确定要删除此卡号下的所有礼品卡吗？此操作将使此卡号对应的礼品卡全部失效，请谨慎操作！！！')) {
	     $.ajax({
		      type:"POST",
			  url:"__URL__/del/?type=all",
			  dataType:"json",
			  data:{'id':id},
			  success:function(data){
			  				   jSuccess("<strong>删除成功！</strong>",{TimeShown : 500,VerticalPosition : 'center',HorizontalPosition : 'center',onClosed:function(){location.reload();}})
              }
		})
	}
}
</script>
